package study.nosql.redis.support;

import lombok.extern.slf4j.Slf4j;
import org.redisson.spring.starter.RedissonAutoConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.redis.connection.RedisConnectionFactory;

import javax.annotation.PostConstruct;
import java.util.List;

@Slf4j
@SpringBootApplication(scanBasePackages = "study.nosql.redis",
        exclude = RedissonAutoConfiguration.class)
public class SpringBootCfg {

    @Autowired
    List<RedisConnectionFactory> factoryList;

    @PostConstruct
    public void init() {
        log.info(">>>>>> Redis Connection >>>>>>");
        factoryList.forEach(e -> {
            log.info("{}", e.getClass().getName());
        });
        log.info(">>>>>> Redis Connection >>>>>>");
    }
}
